// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addWords POST /api/wordrule/add */
export async function addWordsUsingPost(
  body: API.WordRuleAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/wordrule/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** delWords POST /api/wordrule/del */
export async function delWordsUsingPost(
  body: API.WordRuleDelRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/wordrule/del', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listRules GET /api/wordrule/list */
export async function listRulesUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListWordrule_>('/api/wordrule/list', {
    method: 'GET',
    ...(options || {}),
  });
}
